﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CIIS.Common;
using DevExpress.XtraEditors;
using Contract.Domain;

namespace CIIS
{
    public partial class RewardManage : Manage
    {
        public RewardManage()
        {
            InitializeComponent();

            InitUserControl();
        }

        private void InitUserControl()
        {
            RegisterOptFormType(typeof(Reward), typeof(Reward));

            BindGridData(typeof(t_tq_tqjl));

            InitButtonsWithFlag(new string[] { "添加" }, new EOperateType[] { EOperateType.Add });

            InitParamControl(new bool[] { true, true, false, true, false, false },
                new string[] { "代号：", "特情类别：", "", "申请类别：", "", "" },
                new DropdownControlParam[] { null, dao.GetDropdownControlParam<bm_tq_ajlb>(), null, dao.GetDropdownControlParam<bm_tq_tqajlb>(), null, null });

            InitGridViewDataColumns(new string[] { "选中", "代号", "申请类别", "金额", "申请单位", "申请时间" },
                new string[] { "IsSelected", "RYDH", "SQLB", "SQJE", "DJDW", "SQSJ" },
                new DropdownControlParam[] { null, null, dao.GetDropdownControlParam<bm_tq_tqajlb>(), null, dao.OfficeDcp, null });

            InitGridViewOptColumnWithFlag(new string[] { "详情", "修改", "删除" },
                new EOperateType[] { EOperateType.Detail, EOperateType.Modify, EOperateType.Delete });
        }

        //void btnAdd_click(object sender, EventArgs ent)
        //{
        //    Reward dlg = new Reward();
        //    dlg.OptType = EOperateType.Add;
        //    dlg.ShowDialog();
        //}
        //void linkDetail_click(object sender, EventArgs ent)
        //{
        //    Reward dlg = new Reward();
        //    dlg.OptType = EOperateType.Detail;
        //    dlg.ShowDialog();
        //}
        //void linkModify_click(object sender, EventArgs ent)
        //{
        //    Reward dlg = new Reward();
        //    dlg.OptType = EOperateType.Modify;
        //    dlg.ShowDialog();
        //}
        //void linkDelete_click(object sender, EventArgs ent)
        //{
        //}
    }
}
